package net.expectx.pay.common;


import net.expectx.common.single.base.BaseResult;
import net.expectx.common.single.base.BaseResultConstants;
import net.expectx.pay.core.common.EXPayResult;

/**
 * @author lijian
 */
public class AdminResult extends BaseResult {


    public AdminResult(Boolean success, BaseResultConstants baseResultConstants, Object data) {
        super(success, baseResultConstants.getCode(),baseResultConstants.getMessage(), data);
    }
    public AdminResult(BaseResult result) {
        super(result.isSuccess(), result.getCode(),result.getMessage(), result.getData());
    }
    public AdminResult(EXPayResult result) {
        super(result.isSuccess(), result.getCode(),result.getMessage(), result.getData());
    }
    public AdminResult(Boolean success,Integer code,String message, Object data) {
        super(success,code, message, data);
    }
    public AdminResult(boolean success) {
        super(
                success,
                success?BaseResultConstants.SUCCESS.getCode():BaseResultConstants.FAILED.getCode(),
                success?BaseResultConstants.SUCCESS.getMessage():BaseResultConstants.FAILED.getMessage(),
                null);
    }
}
